
<div>
	<ul>
		<li><a href="<?php echo $this->url(array('ctrl' => 'answers'));?>" >Tests Home</a></li>
		<li><a href="<?php echo $this->url(array('ctrl' => 'answers','act' => 'csv'));?>" >Export CSV</a></li>
	</ul>
	<?php
	    
		if($this->answers):
			?>
				<table cellpadding="1" cellspacing="1" border="1" >
					<thead>
						<tr>
							<th>id</th>
							<th>Quwestion</th>
							<th>answer</th>
							<th>Is Currect</th>
							<th>#</th>
							<th>#</th>
						</tr>
					</thead>
					<tbody>
			<?php
				$updateUrl = $this->url(array('ctrl' => 'answers', 'act' => 'update'));
				$deleteUrl = $this->url(array('ctrl' => 'answers', 'act' => 'delete'));
				foreach ($this->answers as $answer):
					?>
						<tr>
							<td><?php echo $this->escape($answer->id);?></td>
							<td><?php echo $this->escape($answer->qId);?></td>
							<td><?php echo $this->escape($answer->answer);?></td>
							<td><?php echo $this->escape($answer->isCurrect);?></td>
							<td>
								<a href="<?php echo $updateUrl;?>&id=<?php echo $answer->id;?>" >
									Update
								</a>
							</td>
							<td>
								<a href="<?php echo $deleteUrl;?>&id=<?php echo $answer->id;?>" >
									Delete
								</a>
							</td>
							
						</tr>
					<?php
				endforeach;
			?></tbody></table><?php
		endif; 
	?>
</div>